package com.cnap.model.strategy.schedule;

import com.cnap.model.schedule.engine.DeployPolicyConfigV2;

/**
 * 能耗策略
 *
 * @author xc
 **/
public class EnergyStrategyDTO extends CommonScheduleDTO {
    // TODO 暂未对接2023.06.19
    // 需要获取能耗的请求参数
    private String policy;


    /**
     * get
     *
     * @return Policy
     */
    public String getPolicy() {
        return policy;
    }

    /**
     * set
     *
     * @param policy policy
     */
    public void setPolicy(String policy) {
        this.policy = policy;
    }

    @Override
    public DeployPolicyConfigV2 toConfigV2() {
        DeployPolicyConfigV2 configV2 = new DeployPolicyConfigV2();
        configV2.setPolicyRatio(this.getPercent());
        configV2.setPolicyParam("");
        configV2.setPolicy(PolicyEnum.getEnNameFromChName(this.getPolicy()));
        return configV2;
    }
}
